// import { register as registerFlow } from '@topology/flow-diagram'
// import { register as registerActivity } from '@topology/activity-diagram'
// import { register as registerSequence } from '@topology/sequence-diagram'

import { register as registerClass } from '@/class-diagram/index'

export function canvasRegister() {
  // registerFlow()
  // registerActivity()
  // registerSequence()
  registerClass()
}

export const Tools = [
  {
    group: '基本形状',
    children: [
      // {
      //   name: '空调',
      //   iconpath: require('../assets/img/kt1.png'),
      //   data: {
      //     text: '- ℃',
      //     rect: {
      //       width: 100,
      //       height: 100
      //     },
      //     paddingLeft: 10,
      //     paddingRight: 10,
      //     paddingTop: 10,
      //     paddingBottom: 10,
      //     borderRadius: 0.1,
      //     font:{color: '#13d851',fontSize: 15},
      //     image: '/img/kt1.png',
      //     // dev
      //    //  image: '../assets/img/kt1.png',
      //     name: 'ktstate'
      //   }
      // },
      {
        name: '温控器',
        iconpath: require('../assets/img/kton.png'),
        data: {
          text: '- ℃ 低速',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          font:{color: '#6e61d8',fontSize: 12},
          image: '/img/kton.png',
          // dev
          //image: '../assets/img/kton.png',
          name: 'kt'
        }
      },
      // {
      //   name: 'room',
      //   iconpath: require('../assets/img/room.png'),
      //   data: {
      //     text: '',
      //     rect: {
      //       width: 600,
      //       height: 600
      //     },
      //     paddingLeft: 10,
      //     paddingRight: 10,
      //     paddingTop: 10,
      //     paddingBottom: 10,
      //     borderRadius: 0.1,
      //     image: '/img/timg.jfif',
      //     // dev
      //     // image: '../assets/img/timg.jfif',
      //     name: 'room'
      //   }
      // },
      // {
      //   name: '空调关机',
      //   iconpath: require('../static/img/shutdown.png'),
      //   data: {
      //     text: '',
      //     rect: {
      //       width: 100,
      //       height: 100
      //     },
      //     paddingLeft: 10,
      //     paddingRight: 10,
      //     paddingTop: 10,
      //     paddingBottom: 10,
      //     borderRadius: 0.1,
      //     image: '/img/shutdown.png',
      //     name: 'ktsd'
      //   }
      // },
      {
        name: 'rectangle',
        icon: 'icon-rectangle',
        data: {
          text: '圆角矩形',
          rect: {
            width: 200,
            height: 50
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,

          name: 'rectangle'
        }
      },
      {
        name: 'circle',
        icon: 'icon-circle',
        data: {
          text: '圆',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'circle',
          textMaxLine: 1
        }
      },
      {
        name: 'triangle',
        icon: 'icon-triangle',
        data: {
          text: '三角形',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'triangle'
        }
      },
      {
        name: 'diamond',
        icon: 'icon-diamond',
        data: {
          text: '菱形',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'diamond'
        }
      },
      {
        name: 'pentagon',
        icon: 'icon-pentagon',
        data: {
          text: '五边形',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'pentagon'
        }
      },
      {
        name: 'hexagon',
        icon: 'icon-hexagon',
        data: {
          text: '六边形',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          paddingTop: 10,
          paddingBottom: 10,
          name: 'hexagon'
        }
      },
      {
        name: 'pentagram',
        icon: 'icon-pentagram',
        data: {
          text: '五角星',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'pentagram'
        }
      },
      {
        name: 'leftArrow',
        icon: 'icon-arrow-left',
        data: {
          text: '左箭头',
          rect: {
            width: 200,
            height: 100
          },
          hideAnchor:true,
          name: 'leftArrow'
        }
      },
      {
        name: 'rightArrow',
        icon: 'icon-arrow-right',
        data: {
          text: '右箭头',
          rect: {
            width: 200,
            height: 100
          },
          hideAnchor:true,
          name: 'rightArrow'
        }
      },
      {
        name: 'twowayArrow',
        icon: 'icon-twoway-arrow',
        data: {
          text: '双向箭头',
          rect: {
            width: 200,
            height: 100
          },
          hideAnchor:true,
          name: 'twowayArrow'
        }
      },
      {
        name: 'line',
        icon: 'icon-line',
        data: {
          text: '直线',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'line'
        }
      },
      // {
      //   name: 'cloud',
      //   icon: 'icon-cloud',
      //   hideAnchor:true,
      //   data: {
      //     text: '云',
      //     rect: {
      //       width: 100,
      //       height: 100
      //     },
      //     name: 'cloud'
      //   }
      // },
      {
        name: 'message',
        icon: 'icon-msg',
        data: {
          text: '消息框',
          rect: {
            width: 100,
            height: 100
          },
          paddingLeft: 10,
          hideAnchor:true,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          name: 'message'
        }
      },
      // {
      //   name: 'file',
      //   icon: 'icon-file',
      //   data: {
      //     text: '文档',
      //     rect: {
      //       width: 80,
      //       height: 100
      //     },
      //     hideAnchor:true,
      //     paddingLeft: 10,
      //     paddingRight: 10,
      //     paddingTop: 10,
      //     paddingBottom: 10,
      //     name: 'file'
      //   }
      // },
      {
        name: 'text',
        icon: 'icon-text',
        data: {
          text: 'text1',
          rect: {
            width: 160,
            height: 30
          },
          hideAnchor:true,
          name: 'text'
        }
      },
      // {
      //   name: 'cube',
      //   icon: 'icon-cube',
      //   data: {
      //     rect: {
      //       width: 50,
      //       height: 70
      //     },
      //     hideAnchor:true,
      //     is3D: true,
      //     z: 10,
      //     zRotate: 15,
      //     fillStyle: '#ddd',
      //     name: 'cube',
      //     icon: '\ue63c',
      //     iconFamily: 'topology',
      //     iconColor: '#777',
      //     iconSize: 30
      //   }
      // },
      // {
      //   name: 'people',
      //   icon: 'icon-people',
      //   data: {
      //     rect: {
      //       width: 70,
      //       height: 100
      //     },
      //     hideAnchor:true,
      //     name: 'people'
      //   }
      // }
    ]
  },
  {
    group: '户型图',
    children: [
      {
        name: 'room1',
        iconpath: require('../assets/img/room1.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          paddingLeft: 10,
          hideAnchor:true,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
         image: '/img/room1.png',
          // dev
         // image: '../assets/img/room1.png',
          name: 'room'
        }
      },
      {
        name: 'room2',
        iconpath: require('../assets/img/room2.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room2.png',
          // dev
        //  image: '../assets/img/room2.png',
          name: 'room'
        }
      },
      {
        name: 'room3',
        iconpath: require('../assets/img/room3.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room3.png',
          // dev
        //  image: '../assets/img/room2.png',
          name: 'room'
        }
      },
      {
        name: 'room4',
        iconpath: require('../assets/img/room4.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room4.png',
          // dev
         // image: '../assets/img/room4.png',
          name: 'room'
        }
      },
      {
        name: 'room5',
        iconpath: require('../assets/img/room5.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room5.png',
          // dev
         // image: '../assets/img/room2.png',
          name: 'room'
        }
      },
      {
        name: 'room6',
        iconpath: require('../assets/img/room6.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room6.png',
          // dev
          // image: '../assets/img/room2.png',
          name: 'room'
        }
      },
      {
        name: 'room7',
        iconpath: require('../assets/img/room7.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room7.png',
          // dev
          // image: '../assets/img/room2.png',
          name: 'room'
        }
      },
      {
        name: 'room8',
        iconpath: require('../assets/img/room8.png'),
        data: {
          text: '',
          rect: {
            width: 600,
            height: 600
          },
          hideAnchor:true,
          paddingLeft: 10,
          paddingRight: 10,
          paddingTop: 10,
          paddingBottom: 10,
          borderRadius: 0.1,
          image: '/img/room8.png',
          // dev
          // image: '../assets/img/room2.png',
          name: 'room'
        }
      }
    ]
  },
  {
    group: '流程图',
    children: [
      {
        name: '开始/结束',
        icon: 'icon-flow-start',
        data: {
          text: '开始',
          rect: {
            width: 120,
            height: 40
          },
          hideAnchor:true,
          borderRadius: 0.5,
          name: 'rectangle'
        }
      },
      {
        name: '流程',
        icon: 'icon-rectangle',
        data: {
          text: '流程',
          rect: {
            width: 120,
            height: 40
          },
          hideAnchor:true,
          name: 'rectangle'
        }
      },
      {
        name: '判定',
        icon: 'icon-diamond',
        data: {
          text: '判定',
          rect: {
            width: 120,
            height: 60
          },
          hideAnchor:true,
          name: 'diamond'
        }
      },
      {
        name: '数据',
        icon: 'icon-flow-data',
        data: {
          text: '数据',
          rect: {
            width: 120,
            height: 50
          },
          hideAnchor:true,
          name: 'flowData'
        }
      },
      {
        name: '准备',
        icon: 'icon-flow-ready',
        data: {
          text: '准备',
          rect: {
            width: 120,
            height: 50
          },
          hideAnchor:true,
          name: 'hexagon'
        }
      },
      {
        name: '子流程',
        icon: 'icon-flow-subprocess',
        data: {
          text: '子流程',
          rect: {
            width: 120,
            height: 50
          },
          hideAnchor:true,
          name: 'flowSubprocess'
        }
      },
      {
        name: '数据库',
        icon: 'icon-db',
        data: {
          text: '数据库',
          rect: {
            width: 80,
            height: 120
          },
          hideAnchor:true,
          name: 'flowDb'
        }
      },
      {
        name: '文档',
        icon: 'icon-flow-document',
        data: {
          text: '文档',
          rect: {
            width: 120,
            height: 100
          },
          hideAnchor:true,
          name: 'flowDocument'
        }
      },
      {
        name: '内部存储',
        icon: 'icon-internal-storage',
        data: {
          text: '内部存储',
          rect: {
            width: 120,
            height: 80
          },
          hideAnchor:true,
          name: 'flowInternalStorage'
        }
      },
      {
        name: '外部存储',
        icon: 'icon-extern-storage',
        data: {
          text: '外部存储',
          rect: {
            width: 120,
            height: 80
          },
          hideAnchor:true,
          name: 'flowExternStorage'
        }
      },
      {
        name: '队列',
        icon: 'icon-flow-queue',
        data: {
          text: '队列',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'flowQueue'
        }
      },
      {
        name: '手动输入',
        icon: 'icon-flow-manually',
        data: {
          text: '手动输入',
          rect: {
            width: 120,
            height: 80
          },
          hideAnchor:true,
          name: 'flowManually'
        }
      },
      {
        name: '展示',
        icon: 'icon-flow-display',
        data: {
          text: '展示',
          rect: {
            width: 120,
            height: 80
          },
          hideAnchor:true,
          name: 'flowDisplay'
        }
      },
      {
        name: '并行模式',
        icon: 'icon-flow-parallel',
        data: {
          text: '并行模式',
          rect: {
            width: 120,
            height: 50
          },
          hideAnchor:true,
          name: 'flowParallel'
        }
      },
      {
        name: '注释',
        icon: 'icon-flow-comment',
        data: {
          text: '注释',
          rect: {
            width: 100,
            height: 100
          },
          hideAnchor:true,
          name: 'flowComment'
        }
      }
    ]
  },
  // {
  //   group: '活动图',
  //   children: [
  //     {
  //       name: '开始',
  //       icon: 'icon-inital',
  //       data: {
  //         text: '',
  //         rect: {
  //           width: 30,
  //           height: 30
  //         },
  //         hideAnchor:true,
  //         name: 'circle',
  //         fillStyle: '#555',
  //         strokeStyle: 'transparent'
  //       }
  //     },
  //     {
  //       name: '结束',
  //       icon: 'icon-final',
  //       data: {
  //         text: '',
  //         rect: {
  //           width: 30,
  //           height: 30
  //         },
  //         hideAnchor:true,
  //         name: 'activityFinal'
  //       }
  //     },
  //     {
  //       name: '活动',
  //       icon: 'icon-action',
  //       data: {
  //         text: '活动',
  //         rect: {
  //           width: 120,
  //           height: 50
  //         },
  //         hideAnchor:true,
  //         borderRadius: 0.25,
  //         name: 'rectangle'
  //       }
  //     },
  //     {
  //       name: '决策/合并',
  //       icon: 'icon-diamond',
  //       data: {
  //         text: '决策',
  //         rect: {
  //           width: 120,
  //           height: 50
  //         },
  //         hideAnchor:true,
  //         name: 'diamond'
  //       }
  //     },
  //     {
  //       name: '垂直泳道',
  //       icon: 'icon-swimlane-v',
  //       data: {
  //         text: '垂直泳道',
  //         rect: {
  //           width: 200,
  //           height: 500
  //         },
  //         hideAnchor:true,
  //         name: 'swimlaneV'
  //       }
  //     },
  //     {
  //       name: '水平泳道',
  //       icon: 'icon-swimlane-h',
  //       data: {
  //         text: '水平泳道',
  //         rect: {
  //           width: 500,
  //           height: 200
  //         },
  //         hideAnchor:true,
  //         name: 'swimlaneH'
  //       }
  //     },
  //     {
  //       name: '垂直分岔/汇合',
  //       icon: 'icon-fork-v',
  //       data: {
  //         text: '',
  //         rect: {
  //           width: 10,
  //           height: 150
  //         },
  //         hideAnchor:true,
  //         name: 'forkV',
  //         fillStyle: '#555',
  //         strokeStyle: 'transparent'
  //       }
  //     },
  //     {
  //       name: '水平分岔/汇合',
  //       icon: 'icon-fork',
  //       data: {
  //         text: '',
  //         rect: {
  //           width: 150,
  //           height: 10
  //         },
  //         hideAnchor:true,
  //         name: 'forkH',
  //         fillStyle: '#555',
  //         strokeStyle: 'transparent'
  //       }
  //     }
  //   ]
  // }
]
